package mode.responsibility16;

public class MinisterHandler extends HandlerApprover{

    private HandlerApprover successor;

    @Override
    public void handler(String msg) {
        System.out.println("大臣没有权限，交给上司");
        this.successor.handler(msg);
    }

    @Override
    public void setSuccessor(HandlerApprover successor) {
        this.successor = successor;
    }

    @Override
    public HandlerApprover getSuccessor() {
        return successor;
    }

}
